<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
	</head>
	<body>
		 <img src="img/1.jpg" id="obj">
		 <br>
		 <button type="button" onclick="a()">开始</button>
	</body>
	<script type="text/javascript">
		function a(){
			var pic =document.getElementById('obj');
			var num=0;
                setInterval(
			   function(){
				   if(num==9){
                      num=0;
				   }
				   num++;
				   pic.src='img/'+num+'.jpg';
			   },1000
			)
		}
	</script>
</html>
